import React, { PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import ReactDOM from 'react-dom';

import { Provider } from 'react-redux';

import DynamicRoutes from './components/routes/index.jsx';

import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import { syncHistoryWithStore, routerReducer } from 'react-router-redux';
import * as reducers from './reducers';
import { createStore, combineReducers } from 'redux';

const reducer = combineReducers({
  reducers,
  routing: routerReducer
})

const DevTools = createDevTools(
  <DockMonitor toggleVisibilityKey="ctrl-h" changePositionKey="ctrl-q">
    <LogMonitor theme="tomorrow" preserveScrollTop={false} />
  </DockMonitor>
)

const store = createStore(
  reducer,
  DevTools.instrument()
)

const history = syncHistoryWithStore(browserHistory, store);

ReactDOM.render(
  <Provider store={store}>
    <Router history={history} routes={DynamicRoutes} />
  </Provider>,
  document.getElementById('root')
)

/**
 * <Route path="/" component={App} >
        <IndexRoute component={workzone.BaseDataContent} />
        <Route path="test" component={workzone.TestContent2} />
        <Route path="test" component={workzone.TestContent2} />
      </Route>
 */













